Component({
    data: {
      passwordlayout: [1, 1, 1, 1, 1, 1],
      passwordCode: "",
      focus: false
    },
  
    methods: {
      showModal: function () {
        this.setData({
          focus: true
        })
      },
  
      closeModal: function () {
        this._clearData();
      },
  
      passwordInput: function (e) {
        this.setData({
          passwordCode: e.detail.value
        })
      },
  
      focusInput: function () {
        this.setData({
          focus: true
        })
      },
  
      getFocus: function () {
        this.setData({
          focus: true
        })
      },
  
      blur: function () {
        this.setData({
          focus: false
        })
      },
  
      dismiss: function (e) {
        this.closeModal();
      },
  
      sure: function (e) {
        if (this.data.passwordCode.length < 6) {
          UIManager.showToast('请输入支付密码');
          return;
        }
        //todo 支付密码验证
      },
  
      clickForgetPassword: function (e) {
        //todo 忘记密码
      },
    }
  })